<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/include/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/include/meta.jsp"%>
<title>struts2首页</title>
	<script type="text/javascript">
		var tab = null;
		var accordion = null;
		var tree = null;
		$(function() {
			//布局
			$("#layout1").ligerLayout({
				leftWidth : 190,
				height : '100%',
				onHeightChanged : function(options) {
					if (tab)
						tab.addHeight(options.diff);
					if (accordion && options.middleHeight - 24 > 0)
						accordion.setHeight(options.middleHeight - 24);
				}
			});
			var height = $(".l-layout-center").height();
			$("#framecenter").height(height);
			//Tab
	
			$("#framecenter").ligerTab({
				height : height
			});
	
			//面板
			$("#accordion1").ligerAccordion({
				height : height - 24,
				speed : "fast"
			});
	
			$(".l-link").hover(function() {
				$(this).addClass("l-link-over");
			}, function() {
				$(this).removeClass("l-link-over");
			});
			tab = $("#framecenter").ligerGetTabManager();
			accordion = $("#accordion1").ligerGetAccordionManager();
			$("#pageloading").hide();
		});
	
		var setting = {
			data : {
				key : {
					title : "t"
				},
				simpleData : {
					enable : true
				}
			},
			view : {
				expandSpeed : "fast"
			},
			callback : {
				onClick : function(event, treeId, treeNode, clickFlag) {
					tab.overrideTabItem("home", {
						tabid : $("#" + treeNode.tId + "_a").attr("id"),
						url : $("#" + treeNode.tId + "_a").attr("f_url"),
						text : $("#" + treeNode.tId + "_a").attr("f_title")
					});
				}
	
			}
		};
	
		var zNodes = [
				{
					id : 1,
					pId : 0,
					name : "金格科技",
					t : "金格科技",
					open : true,
					ext : " f_url=${rootPath}/test.htm f_title=密钥管理-金格科技"
				}, {
					id : 11,
					pId : 1,
					name : "上海分公司",
					t : "上海分公司",
					ext : " f_url=${rootPath}/table.action f_title=密钥管理-上海分公司"
				}, {
					id : 12,
					pId : 1,
					name : "杭州分公司",
					t : "杭州分公司",
					ext : " f_url=${rootPath}/table.action f_title=密钥管理-杭州分公司"
				}, {
					id : 2,
					pId : 0,
					name : "金格科技",
					t : "金格科技",
					open : true
				}, {
					id : 21,
					pId : 2,
					name : "上海分公司",
					t : "上海分公司",
					ext : " f_url=${rootPath}/demo/table.jsp f_title=密钥管理-上海分公司"
				}, {
					id : 22,
					pId : 2,
					name : "杭州分公司",
					t : "杭州分公司",
					ext : " f_url=../test/demos/dialog/dialogAll.htm f_title=密钥管理-杭州分公司"
				} ];
	
		$(document).ready(function() {
			$.fn.zTree.init($("#treeDemo1"), setting, zNodes);
			$.cookie("l-tab-content-width", $(".l-tab-content").width());
			$.cookie("l-tab-content-height", $(".l-tab-content").height());
		});
	</script>
	<style type="text/css">
		body {
			padding: 0px;
			margin: 0;
			overflow: hidden;
		}
		
		.l-link {
			display: block;
			height: 26px;
			line-height: 26px;
			padding-left: 10px;
			text-decoration: underline;
			color: #333;
		}
		
		.l-link2 {
			text-decoration: underline;
			color: white;
		}
		
		.l-layout-top {
			background: #102A49;
			color: White;
		}
		
		.l-layout-bottom {
			background: #E5EDEF;
			text-align: center;
		}
		
		#pageloading {
			position: absolute;
			left: 0px;
			top: 0px;
			background: white url('loading.gif') no-repeat center;
			width: 100%;
			height: 100%;
			height: 700px;
			z-index: 99999;
		}
		
		.l-link {
			display: block;
			line-height: 22px;
			height: 22px;
			padding-left: 20px;
			border: 1px solid white;
			margin: 4px;
		}
		
		.l-link-over {
			background: #FFEEAC;
			border: 1px solid #DB9F00;
		}
	</style>
</head>
<body style="padding: 0px;">
	<div id="pageloading"></div>
	<div id="layout1" style="width: 100%">
		<div position="top" style="background: #102A49; color: White;">
			<div style="margin-top: 10px; margin-left: 10px"></div>
		</div>
		<div position="left" title="主要菜单" id="accordion1">
			<div title="功能列表" class="l-scroll">
				<ul id="treeDemo1" class="ztree">
				</ul>
			</div>
			<div title="应用场景">
				<div style="height: 7px;"></div>
					<a class="l-link"
						href="javascript:f_addTab('listpage','列表页面','demos/case/listpage.htm')">列表页面</a>
			</div>
		</div>
		<div position="center" id="framecenter">
			<div tabid="home" tid="home" title="主页">
				<iframe frameborder="0" name="home" width="100%" height="100%"
					src="table.action?queryMap.test=fdfdfdf&queryMap.test=222222&queryMap.test2=111111">
				</iframe>
			</div>
		</div>
		<div position="bottom">
			<font style="font-size:12">Copyright © 2011 KG</font>
		</div>
	</div>
</body>
</html>
